function [ p, pmax, pmin, norm ] = my_product( A, B )
    if strcmpi(class(A),'uint8') 
        p = uint16(A) .* uint16(B);
    elseif strcmpi(class(A),'uint16')
        p = uint32(A) .* uint32(B);
    else
        p = A .* B;
    end  
    pmax = max(p(:));
    pmin = min(p(:));
    norm = (double(p) - double(pmin)) / double(pmax);
end

